package com.java.comprehensive.design.behavioral_model.mediator_pattern;

/**
 * 具体同事类
 */
public class Tenant extends Person {

    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    //和中介沟通
    public void constact(String msg) {
        mediator.constact(msg, this);
    }

    //获取信息
    public void getMessage(String msg) {
        System.out.println("租房者" + name + "获取到的信息是：" + msg);
    }
}
